<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>开始使用 layui</title>
    <!--<link rel="stylesheet" th:href="@{/layui/css/layui.css}" >-->
    <!-- 使用CDN方式引入 -->
    <link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui-v2.6.3/css/layui.css"/>
</head>
<body>
<div class="layui-main site-inline site-fix">
    <div class="site-text site-block">
        <form class="layui-form" action="" method="post">
            <div class="layui-form-item">
                <label class="layui-form-label">输入框</label>
                <div class="layui-input-block">
                    <input type="text" name="username" placeholder="请输入用户名" autocomplete="on" class="layui-input">
                </div>
            </div>
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
<!-- layui动态表格 -->
<div>
    <table class="layui-table" lay-data="{page:true, id:'test'}" layui-filter="test">
        <thead>
        <tr>
            <th lay-data="{field:'username', width:200, sort:true}">用户名称</th>
            <th lay-data="{field:'password', width:200}">用户密码</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="user:${userlist}">
            <td th:text="${user.getUsername()}"></td>
            <td th:text="${user.getPassword()}"></td>
        </tr>

        </tbody>
    </table>
</div>

<!--<script th:src="@{./layui/layui.js}"></script>-->
<script src="https://www.layuicdn.com/layui-v2.6.3/layui.js"></script>
<script>
    // layui.use(['jquery', 'layer','form'], function(){
    // var $ = layui.$ //重点处
    // ,layer = layui.layer;
    //
    // //后面就跟你平时使用jQuery一样
    // $('body').append('hello jquery');
    //
    // });


</script>
</body>
</html>